import request from '@/utils/request'
// 配置表查询
export function selectzt(data) {
    return request({
        url: '/ammeter/selectzt',
        method: 'post',
        data: data
    })
    }
    // 载体新增
    export function addZt(data) {
        return request({
            url: '/ammeter/addZt',
            method: 'post',
            data: data
        })
    }
    // 载体修改
    export function updateZt(data) {
        return request({
            url: '/ammeter/updateZt',
            method: 'post',
            data: data
        })
    }
// 电表列表查询
export function useList(data) {
  return request({
    url: '/ammeter/selectuseFilter',
   method: 'post',
    data: data
  })
}
/** 空闲电表列表查询 */
export function freeList(data) {
  return request({
    url: '/ammeter/selectFreeFilter',
     method: 'post',
    data: data
  })
}
// 新增
export function addMeter(data) {
  return request({
    url: '/ammeter/add',
    method: 'post',
    data: data
  })
}
// 企业列表
export function enterpriseList(data) {
  return request({
    url: '/ammeter/enterprise',
    method: 'post',
    data: data
  })
}
// 房源列表
export function selectRoom(data) {
  return request({
    url: '/ammeter/selectRoom',
    method: 'post',
    data: data
  })
}
// 启动关联
export function startAssociation(data) {
  return request({
    url: '/ammeter/startAssociation',
    method: 'post',
    data: data
  })
}
// 电表初始电量 
export function startDayPower(data) {
  return request({
    url: '/ammeter/startDayPower',
    method: 'post',
    data: data
  })
} 
// 退用取关 
export function withdraw(data) {
  return request({
    url: '/ammeter/withdraw',
    method: 'post',
    data: data
  })
}
// 关联房间更新
// 1
export function selectAmmeter1(data) {
  return request({
    url: '/ammeter/selectAmmeter1',
    method: 'post',
    data: data
  })
}
// 2
export function selectRoom1(data) {
  return request({
    url: '/ammeter/selectRoom1',
    method: 'post',
    data: data
  })
}
// 关联房间
export function updateRoom(data) {
  return request({
    url: '/ammeter/updateRoom',
    method: 'post',
    data: data
  })
}
// 联系人 
/*  查询 */
export function selectContact(data) {
  return request({
    url: '/users/selectContact',
    method: 'post',
    data: data
  })
}
/**新增 */ 
export function addContact(data) {
  return request({
    url: '/users/add',
    method: 'post',
    data: data
  })
}
/**修改 */ 
export function updateContact(data) {
  return request({
    url: '/users/update',
    method: 'post',
    data: data
  })
}
// 智联器
/**新增 */
export function addzl(data) {
  return request({
    url: '/ammeter/selectzl',
    method: 'post',
    data: data
  })
}
/**查询 */ 
export function selectAllZl(data) {
  return request({
    url: '/ammeter/selectAllZl',
    method: 'post',
    data: data
  })
}
/**租用管理 */
// 租用中 
export function selectUseList(data) {
  return request({
    url: '/users/selectUseList',
    method: 'post',
    data: data
  })
}
// 退租
export function selectFreeList(data) {
  return request({
    url: '/users/selectFreeList',
    method: 'post',
    data: data
  })
}
//计费电表列表
export function selectMeterList(params) {
  return request({
    url: '/ammeter/selectMeterList',
    method: 'get',
    params  
  })
}
//切换电表计费状态 
export function ammeterZyStatus(data) {
  return request({
    url: '/billing/ammeterZyStatus',
    method: 'post',
    data:data
  })
} 
// 电表费用列表
export function selectMeterFeeList(params) {
  return request({
    url: '/billing/selectMeterFeeList',
    method: 'get',
    params
  })
}
//租户电费列表
export function selectZhFeeList(params) {
  return request({
    url: '/billing/selectZhFeeList',
    method: 'get',
    params
  })
}
//确认电表电费
export function confirmMeterFee(data) {
  return request({
    url: '/billing/confirmMeterFee',
    method: 'post',
    data: data
  })
}
//确认客户应收电费
export function confirmZhFee(data) {
  return request({
    url: '/billing/confirmZhFee',
    method: 'post',
    data: data
  })
}
//拉合闸操作 
export function switchAmmeter(params) {
  return request({
    url: '/ammeter/switch',
    method: 'get',
    params
  })
}